﻿//Copyright (c) Chris Pietschmann 2013 (http://pietschsoft.com)
//Licensed under the GNU Library General Public License (LGPL)
//License can be found here: http://easypatterns.codeplex.com/license

namespace EasyPatterns.Factory
{
    /// <summary>
    /// Factory Pattern interface
    /// </summary>
    public interface IFactory
    {
        object Create();
    }

    /// <summary>
    /// A Generic Factory Pattern interface
    /// </summary>
    /// <typeparam name="T">The Type of object returned from the Create method.</typeparam>
    public interface IFactory<T> : IFactory
    {
        /// <summary>
        /// Creates a new instance of the specified Type.
        /// </summary>
        /// <returns>An instance of the specified Type.</returns>
        new T Create();
    }
}
